/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Index page styling */
.md-grid { max-width: 80%; }
.footer { padding-bottom: 30vh; }
.centered-logo-text-group { display: inline-flex; align-items: center; gap: 1.5em; margin-bottom: 0.5em; vertical-align: middle; }
.centered-logo-text-group img { height: auto; }
.centered-logo-text-group h1 { margin: 0; text-align: left; }
.install-command-container { max-width: 600px; margin: 2.5em auto; padding: 1.5em 2em; background-color: var(--md-code-bg-color, #f5f5f5); border-radius: 8px; box-shadow: 0 3px 6px rgba(0,0,0,0.05); border-left: 5px solid var(--md-primary-fg-color, #526cfe); margin-top: 30px; }
.install-command-container p { font-size: 1.1em; color: var(--md-default-fg-color); margin-bottom: -10px; margin-top: -10px; }
.install-command-container p code { font-size: 1.1em; font-weight: 600; padding: 0.3em 0.6em; background-color: var(--md-code-fg-color--light); text-align: center; border-radius: 4px; display: inline-block; line-height: 1.4; }
#centered-install-tabs .tabbed-labels.tabbed-labels--linked { display: flex; justify-content: center; width: 100%; } /* Centered install tabs in the homepage*/
#centered-install-tabs .tabbed-labels { display: flex; justify-content: center; width: 100%; } /* Centered install tabs in the homepage*/

/* YouTube Video Grid Layout - Community page*/
.video-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 1.5em; margin-bottom: 1.5em; }

/* For 3 items per row: 100% / 3 = 33.333% */
.video-item { flex: 0 1 calc(33.333% - 13.333px); box-sizing: border-box; min-width: 250px; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #f0f0f0; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 992px) {  .video-item { flex: 0 1 calc(50% - 10px); }  }
@media (max-width: 600px) {  .video-item { flex: 0 1 100%; }  }

/* YouTube icon */
.youtube-red-icon svg { fill: #FF0000 !important; }

/* Replace full site name with "ADK" on mobile */
@media screen and (max-width: 76.1875em) {
  .md-header__topic .md-ellipsis {
    display: none;
  }

  .md-header__topic::before {
    content: "ADK";
    display: block;
    padding-left: 0.6rem;
  }
}

/* Custom styles for handling two repository links */
.md-header__source {
  max-width: 480px;
  display: flex;
  align-items: center;
}

/* Hide the custom repository links on mobile viewports */
@media screen and (max-width: 76.1875em) {
  .md-header__source {
    display: none;
  }
}

/* Hide repository stats but keep repository names visible */
.md-source__facts {
  display: none !important;
}

/* Ensure repository names are fully visible */
.md-source__repository {
  white-space: nowrap;
  max-width: none !important;
  overflow: visible !important;
}

/* Style for the main navigation section titles */
nav.md-nav--primary .md-nav__item--section > .md-nav__link {
  color: #1565C0;
  font-weight: bold;
  font-size: 0.8rem;
}
/* Community Resources cards */

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.resource-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #4285F4;
}
.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #f0f4f8;
}
.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.0rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-content .type {
    font-size: 0.7rem;
    font-weight: 600;
    color: #4285F4;
    margin-bottom: 0.5rem;
}
.card-content h3 {
    font-size: 0.9rem;
    color: #1a202c;
    margin: 0;
}
.card-content p {
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.6;
    margin-top: 0.75rem;
    flex-grow: 1;
}

.translation-list {
    list-style: none; padding: 0; display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.translation-list a {
    display: block; padding: 1rem 1.5rem; border-radius: 8px;
    background: #f7fafc; border: 1px solid #e2e8f0; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; color: #2d3748;
    transition: all 0.2s ease-in-out;
}
.translation-list a:hover {
    background: white; border-color: #4285F4; transform: translateY(-2px);
}

/* Tool cards */

.tool-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}
.tool-card {
    width: 280px;
    padding-left: 10px;
    padding-right: 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #4285F4;
}
.tool-card-image-wrapper {
    width: 70px;
    height: auto;
    background-color: transparent;
    padding: 0.5rem;
    box-sizing: border-box;
    flex-shrink: 0;
}
.tool-card-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.tool-card-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.tool-card-content h3 {
    font-size: 0.8rem;
    font-weight: bold;
    color: #1a202c;
    margin: 0;
}
.tool-card-content p {
    font-size: 0.75rem;
    color: #4a5568;
    line-height: 1.5;
    margin-top: 0.2rem;
    flex-grow: 1;
}
